package com.aspose.cells;

import java.util.ArrayList;
import java.util.Iterator;

public class Cell {
   int a;
   Row b;
   zfv c;
   private boolean e = true;
   Cells d;

   void a() {
      if (this.b.a.f() < 0) {
         throw new CellsException(7, "Cell's row has been removed: " + this.i());
      } else {
         this.a = this.b.a.b(this.c.a, this.a);
         if (this.a < 0) {
            throw new CellsException(7, "Cell has been removed: " + this.i());
         }
      }
   }

   void b() {
      if (this.b.a.f() < 0) {
         throw new CellsException(7, "Cell's row has been removed: " + this.i());
      } else {
         this.a = this.b.a.b(this.c.a, this.a);
         if (this.a < 0) {
            throw new CellsException(7, "Cell has been removed: " + this.i());
         } else {
            if (this.e) {
               this.c = this.b.a.a(this.a, this.c, 7);
            }

         }
      }
   }

   void c() {
      if (this.e) {
         this.b();
      } else if (this.c.b < 0) {
         this.b.a.g();
      }

   }

   private void L() {
      switch(this.c.c) {
      case 4:
         this.d.r().g.b((zayy)this.c.d);
         break;
      case 5:
         this.K();
         this.d.b.b(((zyi)this.c.d).a);
      }

   }

   void a(String var1) {
      this.L();
      this.c.c = 4;
      this.c.d = this.d.r().g.a(var1);
      this.b.a.b(this.a, this.c);
      this.M();
   }

   void a(int var1, Object var2, boolean var3) {
      if (this.c.c != var1 || var1 != 0 && !this.c.d.equals(var2)) {
         if (var3) {
            this.L();
         }

         this.c.c = var1;
         this.c.d = var2;
         this.b.a.b(this.a, this.c);
         this.M();
      }
   }

   void a(zfv var1, int var2, boolean var3) {
      if ((var2 & 2) != 0 && var1.b == this.c.b) {
         var2 &= -3;
         if (var2 == 0) {
            return;
         }
      }

      if ((var2 & 4) != 0) {
         if (this.c.c == var1.c && (var1.c == 0 || this.c.d.equals(var1.d))) {
            var2 &= -5;
            if (var2 == 0) {
               return;
            }
         }

         if (var3) {
            this.L();
         }

         this.M();
      }

      this.b.a.b(this.a, var1, var2);
   }

   void a(int var1) {
      this.c.b = var1;
      this.b.a.j(this.a, var1);
   }

   void a(boolean var1) {
      this.c.e = var1;
      if (this.c.c == 4) {
         this.b.a.b(this.a, this.c);
      }

   }

   public void calculate(CalculationOptions options) {
      if (this.c.c == 5) {
         Worksheet var2 = this.d.h();
         zaay var3 = new zaay(var2, 3, options);
         var3.p.g.ae();
         zyi var4 = (zyi)this.c.d;
         var4.a((byte)0);
         var3.b(var4);
      }
   }

   public void calculate(boolean ignoreError, ICustomFunction customFunction) {
      if (!CalculationOptions.a) {
         CalculationOptions var6 = new CalculationOptions();
         var6.b = ignoreError;
         var6.setCustomFunction(customFunction);
         this.calculate(var6);
      } else {
         this.b();
         if (this.f()) {
            try {
               this.a((byte)0);
               zyh var3 = new zyh(this.d.r().n());
               var3.a(ignoreError, customFunction);
               var3.a(1);
               Object var4 = var3.a(this);
               this.a((Object)var4, (byte)2);
            } catch (Exception var5) {
               if (!ignoreError) {
                  throw new CellsException(5, "Error in calculating cell [" + this.d.h().getName() + "!" + this.i() + "]: " + com.aspose.cells.a.c.zl.a(var5));
               }
            }

         }
      }
   }

   public Worksheet getWorksheet() {
      return this.d.h();
   }

   Cell(Row row, int cellPos) {
      this.b = row;
      this.d = row.d;
      this.a = cellPos;
      zfv var3 = new zfv();
      this.c = this.b.a.a(cellPos, var3, 7);
      this.e = this.c == var3;
   }

   Cell(Row row, int cellPos, zfv celldata, boolean needSyncData) {
      this.b = row;
      this.d = row.d;
      this.c = celldata;
      this.a = cellPos;
      this.e = needSyncData;
   }

   private void M() {
      if (this.d.r().n().a) {
         zyq var1 = this.d.b.e;
         if (var1 != null) {
            var1.b(this.b.getIndex(), this.c.a);
         }
      }

   }

   public void putValue(boolean boolValue) {
      this.b();
      this.a(2, boolValue ? zml.d : zml.e, true);
   }

   public void putValue(int intValue) {
      this.b();
      int var2 = this.c.c;
      Object var3 = this.c.d;
      zavz.a((long)intValue, this.c);
      int var4 = this.c.c;
      Object var5 = this.c.d;
      this.c.c = var2;
      this.c.d = var3;
      this.a(var4, var5, true);
   }

   public void putValue(double doubleValue) {
      this.b();
      if (!Double.isNaN(doubleValue) && !Double.isInfinite(doubleValue)) {
         this.a(doubleValue);
      } else {
         zst var3 = zst.c;
         byte var4 = zsk.b(var3);
         this.a(3, com.aspose.cells.a.c.zi.a(var4), true);
      }

   }

   private void a(double var1) {
      if (this.e) {
         int var3 = this.c.c;
         Object var4 = this.c.d;
         zavz.a(var1, this.c);
         int var5 = this.c.c;
         Object var6 = this.c.d;
         this.c.c = var3;
         this.c.d = var4;
         this.a(var5, var6, true);
      } else {
         this.a(1, var1, true);
      }

   }

   boolean d() {
      return this.c.a();
   }

   void e() {
      this.a(0, (Object)null, true);
   }

   public void putValue(String stringValue, boolean isConverted, boolean setStyle) {
      if (isConverted && stringValue != null && !"".equals(stringValue)) {
         zati var4 = zyc.a(stringValue, this.d.r().n().getSettings().e());
         if (var4 == null) {
            this.putValue(stringValue);
         } else {
            boolean var5 = false;
            Object var6 = null;
            int var12;
            switch(var4.a()) {
            case 1:
               DateTime var13 = (DateTime)var4.d();
               double var15 = zbtq.a(var13, this.d.h().getWorkbook().getSettings().getDate1904());
               if (var15 < 0.0D) {
                  this.putValue(stringValue);
                  return;
               }

               var12 = this.c.c;
               var6 = this.c.d;
               zavz.a(var15, this.c);
               int var10 = this.c.c;
               Object var11 = this.c.d;
               this.c.c = var12;
               this.c.d = var6;
               var12 = var10;
               var6 = var11;
               break;
            case 4:
               var12 = this.c.c;
               var6 = this.c.d;
               zavz.a(((zatj)var4).i(), this.c);
               int var7 = this.c.c;
               Object var8 = this.c.d;
               this.c.c = var12;
               this.c.d = var6;
               var12 = var7;
               var6 = var8;
               break;
            default:
               this.putValue(stringValue);
               return;
            }

            this.b();
            if (setStyle) {
               Style var14 = a(this.d, this.b, this.c, this.a, false);
               if (!com.aspose.cells.b.a.zv.b(var14.getCustom(), var4.e())) {
                  var14.setCustom(var4.e());
                  zfv var16 = new zfv();
                  var16.c = var12;
                  var16.d = var6;
                  var16.b = this.d.r().B().c(var14);
                  this.a((zfv)var16, 6, true);
                  return;
               }
            }

            this.a(var12, var6, true);
         }
      } else {
         this.putValue(stringValue);
      }
   }

   public void putValue(String stringValue, boolean isConverted) {
      this.putValue(stringValue, isConverted, false);
   }

   public void putValue(String stringValue) {
      this.b();
      if (stringValue == null) {
         this.a(0, (Object)null, true);
      } else {
         if (stringValue.length() > 0 && stringValue.charAt(0) == '\'') {
            stringValue = stringValue.substring(1);
            if (this.getWorksheet().getWorkbook().getSettings().getCheckExcelRestriction() && stringValue.length() > 32767) {
               zgy.a(this.i());
            }

            Style var4 = a(this.d, this.b, this.c, this.a, false);
            if (this.a(stringValue, this.c)) {
               if (var4.t()) {
                  return;
               }

               var4.i(true);
               this.a(this.d.r().B().c(var4));
            } else if (var4.t()) {
               this.a(stringValue);
            } else {
               this.L();
               zfv var3 = new zfv();
               var3.c = 4;
               var3.d = this.d.r().g.a(stringValue);
               var4.i(true);
               var3.b = this.d.r().B().c(var4);
               this.a((zfv)var3, 6, false);
            }
         } else {
            if (this.getWorksheet().getWorkbook().getSettings().getCheckExcelRestriction() && stringValue.length() > 32767) {
               zgy.a(this.i());
            }

            byte var2 = zsk.a(stringValue);
            if (var2 != -1) {
               this.a(3, com.aspose.cells.a.c.zi.a(var2), true);
            } else {
               if (this.a(stringValue, this.c)) {
                  return;
               }

               this.a(stringValue);
            }
         }

      }
   }

   private boolean a(String var1, zfv var2) {
      if (var2.c != 4) {
         return false;
      } else {
         zayy var3 = (zayy)var2.d;
         return !var3.f() && var3.c.equals(var1);
      }
   }

   public void putValue(DateTime dateTime) {
      this.b();
      double var2 = CellsHelper.getDoubleFromDateTime(dateTime, this.d.r().n().getSettings().getDate1904());
      if (var2 < 0.0D) {
         this.a(4, this.d.r().g.a(this.a(dateTime)), true);
      } else {
         this.a(var2);
      }

   }

   private String a(DateTime var1) {
      zxx var2 = this.getWorksheet().getWorkbook().getSettings().e();
      zafy var3 = var2.a(this.p());
      return var3.a() == 3 ? var3.a(var2.j(), 16, var1).h() : com.aspose.cells.b.a.zr.a(var1);
   }

   public DateTime getDateTimeValue() {
      if (this.e) {
         this.b();
      }

      if (this.c.d == null) {
         throw new CellsException(7, "Cell contains no data in Cell " + this.i());
      } else {
         switch(this.c.c) {
         case 0:
            throw new CellsException(7, "Cell contains no data in Cell " + this.i());
         case 1:
            return CellsHelper.getDateTimeFromDouble((Double)this.c.d, this.d.r().n().getSettings().getDate1904());
         case 5:
            zyi var1 = (zyi)this.c.d;
            switch(var1.c) {
            case 1:
               return CellsHelper.getDateTimeFromDouble((Double)var1.d, this.d.r().n().getSettings().getDate1904());
            case 6:
               return CellsHelper.getDateTimeFromDouble(zavz.a((Integer)var1.d), this.d.r().n().getSettings().getDate1904());
            }
         case 2:
         case 3:
         case 4:
         default:
            throw new CellsException(7, "Not a DateTime value in Cell " + this.i());
         case 6:
            return CellsHelper.getDateTimeFromDouble(zavz.a((Integer)this.c.d), this.d.r().n().getSettings().getDate1904());
         }
      }
   }

   public void putValue(Object objectValue) {
      if (objectValue == null) {
         this.b();
         this.a(0, (Object)null, true);
      } else {
         int var2 = zamo.a(objectValue.getClass());
         zfv var3 = new zfv();
         if (!var3.b(var2, objectValue, this.e)) {
            switch(var3.c) {
            case 1:
               this.putValue((DateTime)var3.d);
               return;
            case 4:
               this.putValue((String)var3.d);
               return;
            }
         }

         this.b();
         this.a(var3.c, var3.d, true);
      }
   }

   public int getRow() {
      return this.b.a.h();
   }

   public int getColumn() {
      return this.c.a;
   }

   void a(Cell var1) {
      this.d(var1);
      if (var1.f()) {
         if (var1.z()) {
            this.setFormula(var1.getFormula());
         }

         if (var1.c.a != this.c.a) {
            zyi var2 = (zyi)this.c.d;
            zyo.a(this.d.r(), 0, 0, 0, this.c.a, this.c.a - var1.c.a, var1.c.a, var2.b, -1, -1);
         }
      }

   }

   void a(Cell var1, int var2) {
      this.d(var1);
      if (var1.c.c == 5) {
         if (var1.z()) {
            this.setFormula(var1.getFormula());
         }

         if (var1.getRow() != this.getRow() && this.c.c == 5) {
            int var3 = var1.getRow();
            int var4 = this.getRow();
            zyi var5 = (zyi)this.c.d;
            zyo.a(this.d.r(), var4, var4 - var3, var3, 0, 0, 0, var5.b, -1, -1);
            if (var1.D() != null && var1.D().b()) {
               zyo.a(this.d.r(), var4, var4 - var3, var3, 0, 0, 0, var5.a().d(), -1, -1);
               CellArea var6 = (CellArea)zayd.a(var1.D().a(), var3, var2, var4);
               this.D().a(var6);
            }
         }
      }

   }

   static void a(zp var0, int var1, int var2, int var3, Worksheet var4, boolean var5) {
      if (var0.h(var1) == 5) {
         zyi var6 = (zyi)var0.i(var1);
         short var7 = var6.f;
         if (var5 && var7 >= var2) {
            var6.f += (short)var3;
         }

         if (var6.a() != null) {
            var6.a().b(var4, var5, var7, var6.f, var3, var2);
         }

         zyo.c(var4, var5, var2, var3, var7, var6.f, -1, -1, var6.b);
      }

   }

   static void b(zp var0, int var1, int var2, int var3, Worksheet var4, boolean var5) {
      if (var0.h(var1) == 5) {
         zyi var6 = (zyi)var0.i(var1);
         int var7 = var6.e;
         if (var5 && var7 >= var2) {
            var6.e += var3;
         }

         if (var6.a() != null) {
            var6.a().a(var4, var5, var7, var6.e, var3, var2);
         }

         zyo.a(var4, var5, var2, var3, var7, var6.e, -1, -1, var6.b);
      }

   }

   void a(CellArea var1, int var2, Worksheet var3, boolean var4) {
      if (this.c.c == 5) {
         zyi var5 = (zyi)this.c.d;
         if (var5.f >= var1.StartColumn && var5.f <= var1.EndColumn && var5.e >= var1.StartRow) {
            var5.e += var2;
         }

         a((zyi)var5, 0, var1, var2, var3, var4);
      }

   }

   static void a(zp var0, int var1, CellArea var2, int var3, Worksheet var4, boolean var5) {
      if (var0.h(var1) == 5) {
         zyi var6 = (zyi)var0.i(var1);
         if (var6.f >= var2.StartColumn && var6.f <= var2.EndColumn && var6.e >= var2.StartRow) {
            var6.e += var3;
         }

         a((zyi)var6, 0, var2, var3, var4, var5);
      }

   }

   int b(CellArea var1, int var2, Worksheet var3, boolean var4) {
      byte var5 = 0;
      int var6 = this.getRow();
      short var7 = this.c.a;
      if (var7 >= var1.StartColumn && var7 <= var1.EndColumn && var6 >= var1.StartRow) {
         if (var6 <= var1.EndRow) {
            return 2;
         }

         var6 -= var2;
         var5 = 1;
      }

      if (this.c.c == 5) {
         zyi var8 = (zyi)this.c.d;
         var8.e = var6;
         a((zyi)var8, 4, var1, var2, var3, var4);
      }

      return var5;
   }

   static boolean b(zp var0, int var1, CellArea var2, int var3, Worksheet var4, boolean var5) {
      if (var0.h(var1) == 5) {
         boolean var8 = false;
         zyi var7 = (zyi)var0.i(var1);
         if (var7.e >= var2.StartRow && var7.e <= var2.EndRow && var7.f >= var2.StartColumn) {
            var7.f += (short)var3;
            var8 = true;
         }

         a((zyi)var7, 3, var2, var3, var4, var5);
         return var8;
      } else {
         int var6 = var0.h();
         if (var6 >= var2.StartRow && var6 <= var2.EndRow) {
            return var0.a(var1) >= var2.StartColumn;
         } else {
            return false;
         }
      }
   }

   static void c(zp var0, int var1, CellArea var2, int var3, Worksheet var4, boolean var5) {
      if (var0.h(var1) == 5) {
         zyi var6 = (zyi)var0.i(var1);
         if (var6.e >= var2.StartRow && var6.e <= var2.EndRow && var6.f > var2.EndColumn) {
            var6.f -= (short)var3;
         }

         a((zyi)var6, 1, var2, var3, var4, var5);
      }

   }

   static void a(zyi var0, int var1, CellArea var2, int var3, Worksheet var4, boolean var5) {
      switch(var1) {
      case 0:
         zyo.a(var2, var3, var4, var5, var0.b, -1, -1);
         if (var0.a() != null) {
            var0.a().a(var4, var5, var2, var3, 0, var0.e - var3, var0.f, var0.e, var0.f);
         }
         break;
      case 1:
         zyo.c(var2, var3, var4, var5, var0.b, -1, -1);
      case 2:
      default:
         break;
      case 3:
         zyo.a(var2, var3, var4, var5, var0.b, -1, -1, 0, 0, 0, 0);
         if (var0.a() != null) {
            zyo.a(var2, var3, var4, var5, var0.a().d(), -1, -1, 0, 0, 0, 0);
         }
         break;
      case 4:
         zyo.b(var2, var3, var4, var5, var0.b, -1, -1);
         if (var0.a() != null) {
            var0.a().a(var4, var5, var2, var3, 4, var0.e + var3, var0.f, var0.e, var0.f);
         }
      }

   }

   public boolean isFormula() {
      if (this.e) {
         this.b();
      }

      return this.c.c == 5;
   }

   boolean f() {
      return this.c.c == 5;
   }

   boolean b(Cell var1) {
      if (var1 != null) {
         return var1.b((Cell)null);
      } else {
         if (this.c.d != null && this.c.d instanceof zyi) {
            zyi var2 = (zyi)this.c.d;
            if (var2.a() != null) {
               return zyo.b(this.d.r(), var2.a().d(), -1);
            }

            if (var2.b != null) {
               return zyo.b(this.d.r(), var2.b, -1);
            }
         }

         return false;
      }
   }

   zyi g() {
      return this.c.c == 5 ? (zyi)this.c.d : null;
   }

   public int getType() {
      if (this.e) {
         this.b();
      }

      return this.c.d == null ? 3 : this.b(this.c.c, this.c.d);
   }

   private int b(int var1, Object var2) {
      switch(var1) {
      case 0:
         return 3;
      case 1:
      case 6:
         if (this.p().isDateTime()) {
            return 1;
         }

         return 4;
      case 2:
         return 0;
      case 3:
         return 2;
      case 4:
         return 5;
      case 5:
         zyi var3 = (zyi)var2;
         return this.b(var3.c, var3.d);
      default:
         return 6;
      }
   }

   int h() {
      return this.c.d instanceof zayy ? ((zayy)this.c.d).e : -1;
   }

   public String getName() {
      return CellsHelper.cellIndexToName(this.getRow(), this.c.a);
   }

   String i() {
      return CellsHelper.cellIndexToName(this.getRow(), this.c.a);
   }

   public boolean isErrorValue() {
      if (this.e) {
         this.b();
      }

      if (!this.f()) {
         return false;
      } else {
         zyi var1 = (zyi)this.c.d;
         return ((zyi)this.c.d).c == 3;
      }
   }

   public String getStringValue(int formatStrategy) {
      switch(formatStrategy) {
      case 0:
         return this.getStringValueWithoutFormat();
      case 1:
         return this.getStringValue();
      case 2:
         return this.getDisplayStringValue();
      default:
         return this.getStringValue();
      }
   }

   public String getStringValue() {
      this.c();
      return this.j();
   }

   public String getStringValueWithoutFormat() {
      if (this.e) {
         this.b();
      }

      return this.c.a(true);
   }

   String j() {
      return b(this.d, this.b.a, this.c);
   }

   public int getNumberCategoryType() {
      this.c();
      Style var1 = this.p();
      String var2 = var1.getCustom();
      if (var2 == null || "".equals(var2)) {
         int var3 = zxx.c(var1.getNumber());
         if (var3 != 0) {
            return var3;
         }
      }

      return this.k().g();
   }

   zafy k() {
      zafy var1 = this.getWorksheet().getWorkbook().getSettings().e().a(this.p());
      if (var1.a() == 6) {
         zfv var2 = this.c.d();
         byte var3;
         switch(var2.c) {
         case 0:
         case 3:
            return this.getWorksheet().getWorkbook().getSettings().e().k();
         case 1:
            var3 = 14;
            break;
         case 2:
            var3 = 3;
            break;
         case 4:
         case 5:
         default:
            var3 = 18;
            break;
         case 6:
            var3 = 9;
         }

         var1 = ((zyb)var1).b((zxu)null, var3, var2.d);
         if (var1 == null) {
            return this.getWorksheet().getWorkbook().getSettings().e().k();
         }
      }

      return var1;
   }

   private boolean a(zfv var1) {
      Style var2 = this.p();
      if (var2.getCustom() != null && !"".equals(var2.getCustom())) {
         return this.a(this.getWorksheet().getWorkbook().getSettings().e().a(var2.getCustom(), true), var1);
      } else {
         return var2.getNumber() == 0 ? false : this.a(this.getWorksheet().getWorkbook().getSettings().e().e(var2.getNumber()), var1);
      }
   }

   private boolean a(zafy var1, zfv var2) {
      switch(var1.a()) {
      case 2:
      case 4:
      case 5:
      case 6:
         zyi var3;
         double var4;
         var3 = null;
         var4 = 0.0D;
         label24:
         switch(var2.c) {
         case 1:
            var4 = (Double)var2.d;
            break;
         case 5:
            var3 = (zyi)var2.d;
            switch(var3.c) {
            case 1:
               var4 = (Double)var3.d;
               break label24;
            case 6:
               var4 = zavz.a((Integer)var3.d);
               break label24;
            default:
               return false;
            }
         case 6:
            var4 = zavz.a((Integer)var2.d);
            break;
         default:
            return false;
         }

         double var6 = ((zj)var1).a(var4);
         if (var4 != var6) {
            zavz.a(var6, var2);
            if (var3 != null) {
               var3.c = var2.c;
               var3.d = var2.d;
               var2.c = 5;
               var2.d = var3;
            }

            return true;
         }

         return false;
      case 3:
      default:
         return false;
      }
   }

   Object l() {
      zfv var1 = this.c.d();
      switch(var1.c) {
      case 1:
         if (this.p().isDateTime()) {
            double var4 = (Double)var1.d;
            if (var4 >= 0.0D) {
               return zbtq.a(var4, this.d.r().n().getSettings().getDate1904());
            }
         }

         return var1.d;
      case 3:
         return var1.f();
      case 6:
         if (this.p().isDateTime()) {
            int var2 = (Integer)var1.d;
            if (var2 >= 0) {
               return zbtq.a((double)var2, this.d.r().n().getSettings().getDate1904());
            }
         }

         return var1.d;
      default:
         return var1.d;
      }
   }

   int m() {
      return this.c.d == null ? 3 : this.b(this.c.c, this.c.d);
   }

   public String getDisplayStringValue() {
      this.c();
      return this.n();
   }

   String n() {
      zfv var1 = this.c.d();
      if (var1.c == 0) {
         return "";
      } else if (var1.c == 3) {
         return var1.f();
      } else {
         zfw var2 = new zfw(this.r(), this.d);
         this.a(var2, false, (zaay)null);
         if (var2.c) {
            Style var3 = new Style(this.d.r());
            var3.copy(var2.a);
            var2.a = var3;
            var2.c = var2.b == 15;
         }

         zxu var5 = new zxu();
         zhe var4 = new zhe(this.d, this.getRow(), this.c.a, var2.a, var2.c);
         var5.a(var4);
         return a((zxz)a(var1, var5, var2.a, this.d), (zago)var4, (Style)var2.a);
      }
   }

   String a(int var1, boolean var2) {
      return a(this.d, this.b.a, this.c, var1, var2);
   }

   public int getIntValue() {
      if (this.e) {
         this.b();
      }

      zfv var1 = this.c.d();
      switch(var1.c) {
      case 0:
         throw new CellsException(7, "Cell contains no data in Cell " + this.i());
      case 1:
         double var2 = (Double)var1.d;
         if (var2 <= 2.147483647E9D && var2 >= -2.147483648E9D) {
            return (int)var2;
         }

         throw new CellsException(7, "Cell value type is double , but the value is out of integer range.");
      case 6:
         return (Integer)var1.d;
      default:
         throw new CellsException(7, "Not a numeric value in Cell " + this.d.h().getName() + "!" + this.i());
      }
   }

   public double getDoubleValue() {
      if (this.e) {
         this.b();
      }

      zfv var1 = this.c.d();
      switch(var1.c) {
      case 1:
         return (Double)var1.d;
      case 6:
         return (double)(Integer)var1.d;
      default:
         throw new CellsException(7, "Not a numeric value in Cell " + this.d.h().getName() + "!" + this.i());
      }
   }

   public float getFloatValue() {
      double var1 = this.getDoubleValue();
      if (var1 < 3.4028234663852886E38D && var1 > -3.4028234663852886E38D) {
         return (float)var1;
      } else {
         throw new CellsException(7, "Cell value type is double ,but the value is out of float range.");
      }
   }

   public boolean getBoolValue() {
      if (this.e) {
         this.b();
      }

      switch(this.c.c) {
      case 0:
         throw new CellsException(7, "Cell contains no datain in Cell" + this.i());
      case 2:
         return (Boolean)this.c.d;
      case 5:
         zyi var1 = (zyi)this.c.d;
         if (var1.c == 2) {
            return (Boolean)var1.d;
         }
      default:
         throw new CellsException(7, "Cell value type is not booleanin Cell" + this.i());
      }
   }

   public Style getDisplayStyle() {
      if (this.e) {
         this.b();
      }

      zfw var1 = new zfw(this.r(), this.d);
      this.a(var1, true, (zaay)null);
      if (var1.c) {
         Style var2 = new Style(this.d.r());
         var2.copy(var1.a);
         return var2;
      } else {
         return var1.a;
      }
   }

   void a(zfw var1, boolean var2, zaay var3) {
      Worksheet var4 = this.getWorksheet();
      ListObjectCollection var5 = var4.j();
      if (var5 != null && var5.getCount() > 0) {
         int var6 = var5.b(this.getRow(), this.getColumn());
         if (var6 > -1) {
            ListObject var7 = var5.get(var6);
            int var8 = var7.c(this.getRow(), this.getColumn());
            if (var8 > -1) {
               var5.b.a(var6, var8, var1);
            }
         }
      }

      ConditionalFormattingCollection var11 = var4.m;
      if (var11 != null && var11.getCount() > 0) {
         if (var3 != null) {
            if (var1.e == null) {
               var3.g = this.getRow();
               var3.h = this.c.a;
            } else {
               var3.g = var1.e.getRow();
               var3.h = var1.e.c.a;
            }
         }

         zee var12 = zka.a(var4, var1.e == null ? this : var1.e, var3, var1.a, var1.c);
         if (var12.a != null || var12.c != null) {
            var1.d = var12.c;
            ConditionalFormattingResult var14 = new ConditionalFormattingResult(var12);
            if (var12.a != null || var14.getConditionalFormattingColorScale() != null) {
               if (var1.c && var12.b == var1.a) {
                  var1.a();
                  var12.b = var1.a;
               }

               var1.a = var14.a();
               var1.c = false;
               if (var2 && var14.getConditionalStyle() != null && var14.getConditionalStyle().isModified(16)) {
                  var2 = false;
               }
            }
         }
      }

      if (var2) {
         String var13 = var1.a.getCustom();
         if (var13 == null || var13.equals("")) {
            var13 = var4.getWorkbook().getSettings().e().d(var1.a.getNumber());
         }

         if (var13 != null && var13.indexOf(91) > -1) {
            zfv var15 = this.c.d();
            byte var9 = 18;
            switch(var15.c) {
            case 0:
            case 3:
               var2 = false;
               break;
            case 1:
               if (!var4.getDisplayZeros() && (Double)var15.d == 0.0D) {
                  var2 = false;
                  break;
               }

               var9 = 14;
               break;
            case 2:
               var9 = 3;
            case 4:
            case 5:
            default:
               break;
            case 6:
               if (!var4.getDisplayZeros() && (Integer)var15.d == 0) {
                  var2 = false;
               } else {
                  var9 = 9;
               }
            }

            if (var2) {
               zafy var10 = var4.getWorkbook().getSettings().e().a(var13, var1.c);
               if (var10.a() == 6) {
                  var10 = ((zyb)var10).b((zxu)null, var9, var15.d);
               }

               if (var10 != null && !var10.b().c().isEmpty()) {
                  var1.a();
                  var1.a.getFont().setColor(var10.b().c());
               }
            }
         }
      }

   }

   Style a(boolean[] var1) {
      this.c();
      var1[0] = true;
      boolean var3 = true;
      ConditionalFormattingResult var4 = this.getConditionalFormattingResult();
      Style var2;
      if (var4 != null) {
         var2 = var4.a();
         var1[0] = var4.getConditionalStyle() == null && var4.getConditionalFormattingColorScale() == null;
         if (var4.getConditionalStyle() != null && var4.getConditionalStyle().isModified(16)) {
            var3 = false;
         }
      } else {
         var2 = this.o();
      }

      if (var3 && (var2.getCustom() != null || var2.getNumber() != 0)) {
         zxx var5 = this.getWorksheet().getWorkbook().getSettings().e();
         String var6 = var2.getCustom();
         if (var6 == null) {
            var6 = var5.d(var2.getNumber());
         }

         if (var6.indexOf(91) > -1) {
            zfv var7 = this.c.d();
            if (var7.c != 0) {
               zafy var8 = var5.a(var6, false);
               if (var8.a() == 6) {
                  var8 = ((zyb)var8).a(var7.d);
               }

               if (var8 != null && !var8.b().c().isEmpty()) {
                  var2.getFont().setColor(var8.b().c());
                  var1[0] = false;
               }
            }
         }
      }

      if (this.getWorksheet().getListObjects() != null && this.getWorksheet().getListObjects().getCount() > 0) {
         Workbook var10 = this.getWorksheet().getWorkbook();

         try {
            Style var11 = this.getWorksheet().getListObjects().a(this.getRow(), this.c.a);
            if (var11 != null) {
               var1[0] = false;
               zka.a(var2, var11, var10.getWorksheets().D());
            }
         } catch (Exception var9) {
            ;
         }
      }

      return var2;
   }

   /** @deprecated */
   public Style getConditionalStyle() {
      this.c();
      Style var1 = this.o();
      zka.a(this.d.h(), this, (zaay)null, var1, false);
      ConditionalFormattingResult var3 = this.getConditionalFormattingResult();
      return var3 == null ? null : var3.getConditionalStyle();
   }

   public FormatConditionCollection getFormatConditions() {
      this.c();
      return zka.a(this.d.h(), this);
   }

   Style o() {
      Style var1 = new Style(this.d.r());
      var1.a(this.d.r(), this.r());
      return var1;
   }

   public Style getStyle() {
      this.b();
      return a(this.d, this.b, this.c, this.a, true);
   }

   public Style getStyle(boolean checkBorders) {
      if (checkBorders) {
         this.b();
      } else {
         this.c();
      }

      return a(this.d, this.b, this.c, this.a, checkBorders);
   }

   void a(Style var1, boolean var2) {
      if (var1 == null) {
         this.b(-1);
      } else {
         Style var3 = this.o();
         WorksheetCollection var4 = this.d.r();
         if (var1.e() == null) {
            var1.a(var4);
         }

         this.b(var4.B().c(var1));
         if (!var2) {
            return;
         }

         if (!var1.isModified(1)) {
            return;
         }

         Cell var5 = null;
         Style var6 = null;
         Border var7 = null;
         if (this.c.a > 0 && var1.isModified(2) && !var1.getBorders().getByBorderType(1).b(var3.getBorders().getByBorderType(1))) {
            var5 = this.d.checkCell(this.getRow(), this.c.a - 1);
            if (var5 != null && var5.q()) {
               var6 = var5.o();
               var7 = var1.getBorders().getByBorderType(1);
               var6.getBorders().getByBorderType(2).setLineStyle(var7.getLineStyle());
               if (var7.getLineStyle() != 0) {
                  var6.getBorders().getByBorderType(2).a.f(var7.a);
               }

               var5.a(var6);
            }
         }

         if (this.getRow() > 0 && var1.isModified(4)) {
            var5 = this.d.checkCell(this.getRow() - 1, this.c.a);
            if (var5 != null && var5.q()) {
               var6 = var5.o();
               var7 = var1.getBorders().getByBorderType(4);
               var6.getBorders().getByBorderType(8).setLineStyle(var7.getLineStyle());
               if (var7.getLineStyle() != 0) {
                  var6.getBorders().getByBorderType(8).a.f(var7.a);
               }

               var5.a(var6);
            }
         }

         if (this.c.a < 16383 && var1.isModified(3) && !var1.getBorders().getByBorderType(2).b(var3.getBorders().getByBorderType(2))) {
            var5 = this.d.checkCell(this.getRow(), this.c.a + 1);
            if (var5 != null && var5.q()) {
               var6 = var5.o();
               var7 = var1.getBorders().getByBorderType(2);
               var6.getBorders().getByBorderType(1).setLineStyle(var7.getLineStyle());
               if (var7.getLineStyle() != 0) {
                  var6.getBorders().getByBorderType(1).a.f(var7.a);
               }

               var5.a(var6);
            }
         }

         if (this.getRow() < 1048575 && var1.isModified(5) && !var1.getBorders().getByBorderType(8).b(var3.getBorders().getByBorderType(8))) {
            var5 = this.d.checkCell(this.getRow() + 1, this.c.a);
            if (var5 != null && var5.q()) {
               var6 = var5.o();
               var7 = var1.getBorders().getByBorderType(8);
               var6.getBorders().getByBorderType(4).setLineStyle(var7.getLineStyle());
               if (var7.getLineStyle() != 0) {
                  var6.getBorders().getByBorderType(4).a.f(var7.a);
               }

               var5.a(var6);
            }
         }
      }

   }

   public void setStyle(Style style) {
      this.b();
      this.a(style, this.d.h().getWorkbook().getSettings().getUpdateAdjacentCellsBorder());
   }

   void a(Style var1) {
      if (var1 == null) {
         this.b(-1);
      } else {
         if (var1.e() == null) {
            var1.a(this.d.r());
         }

         this.b(this.d.r().B().c(var1));
      }

   }

   public void setStyle(Style style, boolean explicitFlag) {
      this.b();
      if (!explicitFlag) {
         this.setStyle(style);
      } else if (style != null) {
         WorksheetCollection var3 = this.d.r();
         if (style.e() == null) {
            style.a(var3);
         }

         Style var4 = new Style(var3);
         var4.a(var3, this.r());
         if (style.l()) {
            if (style.isModified(25)) {
               var4.setHorizontalAlignment(style.getHorizontalAlignment());
            }

            if (style.isModified(26)) {
               var4.setVerticalAlignment(style.getVerticalAlignment());
            }

            if (style.isModified(27)) {
               var4.setIndentLevel(style.getIndentLevel());
            }

            if (style.isModified(29)) {
               var4.setTextWrapped(style.isTextWrapped());
            }

            if (style.isModified(30)) {
               var4.setShrinkToFit(style.getShrinkToFit());
            }

            if (style.isModified(28)) {
               var4.setRotationAngle(style.getRotationAngle());
            }

            if (style.isModified(31)) {
               var4.setTextDirection(style.getTextDirection());
            }
         }

         if (style.k()) {
            if (style.isModified(13)) {
               var4.getFont().setName(style.getFont().getName());
            }

            if (style.isModified(16)) {
               var4.b(16);
               var4.getFont().b.f(style.getFont().b);
            }

            if (style.isModified(15)) {
               var4.getFont().setCharset(style.getFont().getCharset());
            }

            if (style.isModified(14)) {
               var4.getFont().a(style.getFont().h());
            }

            if (style.isModified(18)) {
               var4.getFont().setItalic(style.getFont().isItalic());
            }

            if (style.isModified(23)) {
               var4.getFont().setSubscript(style.getFont().isSubscript());
               var4.getFont().setSuperscript(style.getFont().isSuperscript());
            }

            if (style.isModified(12)) {
               var4.getFont().setDoubleSize(style.getFont().getDoubleSize());
            }

            if (style.isModified(20)) {
               var4.getFont().setStrikeout(style.getFont().isStrikeout());
            }

            if (style.isModified(19)) {
               var4.getFont().setUnderline(style.getFont().getUnderline());
            }

            if (style.isModified(17)) {
               var4.getFont().b(style.getFont().g());
            }
         }

         if (style.m()) {
            boolean var5 = var3.n().getSettings().getUpdateAdjacentCellsBorder();
            Cell var6;
            Style var7;
            Border var8;
            if (style.isModified(4) && !style.getBorders().getByBorderType(4).b(var4.getBorders().getByBorderType(4))) {
               var4.getBorders().getByBorderType(4).setLineStyle(style.getBorders().getByBorderType(4).getLineStyle());
               var4.getBorders().getByBorderType(4).a.f(style.getBorders().getByBorderType(4).a);
               if (this.getRow() > 0 && var5) {
                  var6 = this.d.checkCell(this.getRow() - 1, this.c.a);
                  if (var6 != null && var6.q()) {
                     var7 = var6.o();
                     var8 = style.getBorders().getByBorderType(4);
                     var7.getBorders().getByBorderType(8).setLineStyle(var8.getLineStyle());
                     if (var8.getLineStyle() != 0) {
                        var7.getBorders().getByBorderType(8).a.f(var8.a);
                     }

                     var6.a(var7);
                  }
               }
            }

            if (style.isModified(5) && !style.getBorders().getByBorderType(8).b(var4.getBorders().getByBorderType(8))) {
               var4.getBorders().getByBorderType(8).setLineStyle(style.getBorders().getByBorderType(8).getLineStyle());
               var4.getBorders().getByBorderType(8).a.f(style.getBorders().getByBorderType(8).a);
               if (this.getRow() < 1048575 && var5) {
                  var6 = this.d.checkCell(this.getRow() + 1, this.c.a);
                  if (var6 != null && var6.q()) {
                     var7 = var6.o();
                     var8 = style.getBorders().getByBorderType(8);
                     var7.getBorders().getByBorderType(4).setLineStyle(var8.getLineStyle());
                     if (var8.getLineStyle() != 0) {
                        var7.getBorders().getByBorderType(4).a.f(var8.a);
                     }

                     var6.a(var7);
                  }
               }
            }

            if (style.isModified(2) && !style.getBorders().getByBorderType(1).b(var4.getBorders().getByBorderType(1))) {
               var4.getBorders().getByBorderType(1).setLineStyle(style.getBorders().getByBorderType(1).getLineStyle());
               var4.getBorders().getByBorderType(1).a.f(style.getBorders().getByBorderType(1).a);
               if (this.c.a > 0 && var5) {
                  var6 = this.d.checkCell(this.getRow(), this.c.a - 1);
                  if (var6 != null && var6.q()) {
                     var7 = var6.o();
                     var8 = style.getBorders().getByBorderType(1);
                     var7.getBorders().getByBorderType(2).setLineStyle(var8.getLineStyle());
                     if (var8.getLineStyle() != 0) {
                        var7.getBorders().getByBorderType(2).a.f(var8.a);
                     }

                     var6.a(var7);
                  }
               }
            }

            if (style.isModified(3) && !style.getBorders().getByBorderType(2).b(var4.getBorders().getByBorderType(2))) {
               var4.getBorders().getByBorderType(2).setLineStyle(style.getBorders().getByBorderType(2).getLineStyle());
               var4.getBorders().getByBorderType(2).a.f(style.getBorders().getByBorderType(2).a);
               if (this.c.a < 16383 && var5) {
                  var6 = this.d.checkCell(this.getRow(), this.c.a + 1);
                  if (var6 != null && var6.q()) {
                     var7 = var6.o();
                     var8 = style.getBorders().getByBorderType(2);
                     var7.getBorders().getByBorderType(1).setLineStyle(var8.getLineStyle());
                     if (var8.getLineStyle() != 0) {
                        var7.getBorders().getByBorderType(1).a.f(var8.a);
                     }

                     var6.a(var7);
                  }
               }
            }

            if (style.isModified(10)) {
               var4.getBorders().getByBorderType(32).setLineStyle(style.getBorders().getByBorderType(32).getLineStyle());
               var4.getBorders().getByBorderType(32).a.f(style.getBorders().getByBorderType(32).a);
            }

            if (style.isModified(9)) {
               var4.getBorders().getByBorderType(16).setLineStyle(style.getBorders().getByBorderType(16).getLineStyle());
               var4.getBorders().getByBorderType(16).a.f(style.getBorders().getByBorderType(16).a);
            }
         }

         if (style.j() && style.isModified(24)) {
            var4.a(style.r(), style.s());
            var4.k(var4.isDateTime());
         }

         if (style.n()) {
            var4.g(true);
            if (style.isModified(33)) {
               var4.setPattern(style.getPattern());
            }

            if (style.isModified(34)) {
               var4.b.f(style.b);
               var4.b(34);
            }

            if (style.isModified(35)) {
               var4.a.f(style.a);
               var4.b(35);
            }
         }

         if (style.o()) {
            if (style.isModified(36)) {
               var4.setLocked(style.isLocked());
            }

            if (style.isModified(37)) {
               var4.setFormulaHidden(style.isFormulaHidden());
            }
         }

         this.b(this.d.r().B().c(var4));
      }
   }

   public void setStyle(Style style, StyleFlag flag) {
      this.b();
      if (style == null) {
         this.b(-1);
      } else {
         if (style.e() == null) {
            style.a(this.d.r());
         }

         Style var3 = this.getStyle();
         zakq.a(style, var3, flag);
         this.b(this.d.r().B().c(var3));
      }

   }

   Style p() {
      return a(this.d, this.b.a, this.c);
   }

   boolean q() {
      int var1 = this.s();
      return var1 != -1 && var1 != 15;
   }

   public int getSharedStyleIndex() {
      this.c();
      return this.r();
   }

   int r() {
      int var1 = this.s();
      if (var1 != -1) {
         return var1;
      } else {
         var1 = a((Cells)this.d, Row.e(this.b.a), this.c.a);
         return var1 == -1 ? 15 : var1;
      }
   }

   int s() {
      return this.c.b;
   }

   void b(int var1) {
      if (var1 < this.d.r().B().getCount()) {
         this.a(var1);
      }

   }

   String t() {
      if (!this.f()) {
         return null;
      } else {
         this.d.r().n().d();
         return this.d.r().b().a(this);
      }
   }

   public String getFormula() {
      if (this.e) {
         this.b();
      }

      return this.t();
   }

   public void setFormula(String value) {
      this.b();
      this.e();
      if (value != null && !"".equals(value)) {
         this.d.r().x().a(this, value.trim(), (byte)0, true);
      }

   }

   public void setFormula(String formula, Object value) {
      this.b();
      this.e();
      if (formula != null && !"".equals(formula)) {
         this.d.r().x().a(this, formula.trim(), (byte)0, true);
         if (this.c.c == 5) {
            ((zyi)this.c.d).a(this, value);
         }
      }

   }

   String u() {
      if (!this.f()) {
         return null;
      } else {
         zyi var1 = (zyi)this.c.d;
         String var2 = var1.k();
         return var2 != null ? var2 : this.d.r().b().a(this);
      }
   }

   void b(String var1) {
      if (this.d.r().n().getSettings().getParsingFormulaOnOpen()) {
         this.d.r().x().a(this, var1.trim(), (byte)0, false);
      } else {
         zyi var2 = new zyi(this.getRow(), this.c.a, "=" + var1);
         this.a(var2);
      }

   }

   public String getR1C1Formula() {
      if (this.e) {
         this.b();
      }

      if (!this.f()) {
         return null;
      } else {
         this.d.r().n().d();
         return zasp.a(this);
      }
   }

   public void setR1C1Formula(String value) {
      this.b();
      String var2 = zasp.b(value, this.getRow(), this.c.a);
      this.setFormula(var2);
   }

   public boolean containsExternalLink() {
      if (this.e) {
         this.b();
      }

      if (this.f()) {
         this.d.r().n().d();
         byte[] var1 = this.v();
         if (!this.d.r().x().a((byte)1, var1)) {
            return zyo.a(var1, -1, -1, (WorksheetCollection)this.d.r());
         }

         byte var2 = 0;
         byte var3 = 0;
         int[] var4 = new int[]{var2};
         int[] var5 = new int[]{var3};
         this.d.r().x().a(var1, var4, var5);
         int var9 = var4[0];
         int var10 = var5[0];
         Cell var6 = this.d.checkCell(var9, var10);
         if (var6 != null) {
            zaz var7 = var6.D();
            byte[] var8 = var7.d();
            return zyo.a(var8, -1, -1, (WorksheetCollection)this.d.r());
         }
      }

      return false;
   }

   public ReferredAreaCollection getPrecedents() {
      if (this.e) {
         this.b();
      }

      if (!this.f()) {
         return null;
      } else {
         Worksheet var1 = this.d.h();
         var1.getWorkbook().d();
         CalculationOptions var2 = new CalculationOptions();
         var2.b = true;
         var2.h = false;
         zaay var3 = new zaay(var1, 3, var2);
         ReferredAreaCollection var4 = new ReferredAreaCollection();
         ((zyi)this.c.d).a(var4, var3);
         return var4;
      }
   }

   public Cell[] getDependents(boolean isAll) {
      return this.d.getDependents(isAll, this.getRow(), this.c.a);
   }

   public Iterator getLeafs() {
      if (this.d.b.e == null) {
         return null;
      } else {
         ArrayList var1 = this.d.b.e.a(this.getRow(), this.c.a);
         return var1 == null ? null : var1.iterator();
      }
   }

   byte[] v() {
      return this.f() ? ((zyi)this.c.d).b : null;
   }

   void a(byte[] var1) {
      zyi var2;
      if (!this.f()) {
         var2 = new zyi(this.getRow(), this.c.a, var1);
         this.a(var2);
      } else {
         var2 = (zyi)this.c.d;
         var2.b = var1;
      }

   }

   void b(byte[] var1) {
      if (var1 != null) {
         if (var1[0] != 5 || var1[4] != 1 && var1[4] != 2) {
            this.a(var1);
         } else {
            byte[] var2 = new byte[15];
            var2[0] = 7;
            var2[4] = var1[4];
            System.arraycopy(var1, 5, var2, 5, 4);
            System.arraycopy(var1, 13, var2, 9, 2);
            this.a(var2);
         }

      }
   }

   public int getWidthOfValue() {
      Style var1 = this.o();
      return zbpt.a(this.j(), var1.q());
   }

   public int getHeightOfValue() throws Exception {
      String var1 = this.getStringValue(0);
      if (var1 != null && !"".equals(var1)) {
         Style var2 = this.o();
         Cells var3 = this.d;
         int var4 = var3.getColumnWidthPixel(this.getColumn());
         return zbaw.a(this, var2, this.J(), var4, var3.r().L());
      } else {
         return 0;
      }
   }

   byte[] w() {
      byte[] var1 = this.v();
      if (var1 == null) {
         return null;
      } else if (this.d.r().x().a((byte)1, var1)) {
         byte[] var2 = new byte[17];
         var2[0] = 5;
         var2[4] = 1;
         System.arraycopy(var1, 5, var2, 5, 4);
         var2[9] = 4;
         System.arraycopy(var1, 9, var2, 13, 2);
         return var2;
      } else {
         return var1;
      }
   }

   public boolean isArrayHeader() {
      if (this.e) {
         this.b();
      }

      return this.f() ? ((zyi)this.c.d).l() : false;
   }

   public CellArea getArrayRange() {
      if (!this.y()) {
         return new CellArea();
      } else {
         zyi var1 = (zyi)this.c.d;
         if (var1.a() != null) {
            return var1.a().a();
         } else {
            byte[] var2 = var1.b;
            byte var3 = 0;
            byte var4 = 0;
            int[] var5 = new int[]{var3};
            int[] var6 = new int[]{var4};
            this.d.r().x().a(var2, var5, var6);
            int var8 = var5[0];
            int var9 = var6[0];
            Cell var7 = this.d.getRows().a(var8, false, true, false).a(var9, false, true);
            var1 = (zyi)var7.c.d;
            return var1.a().a();
         }
      }
   }

   boolean x() {
      return this.f() ? ((zyi)this.c.d).m() : false;
   }

   public boolean isInArray() {
      if (this.e) {
         this.b();
      }

      return this.y();
   }

   boolean y() {
      return this.f() ? ((zyi)this.c.d).e() : false;
   }

   boolean z() {
      return this.f() ? ((zyi)this.c.d).b(this.d) : false;
   }

   public boolean isInTable() {
      if (this.e) {
         this.b();
      }

      return this.A();
   }

   boolean A() {
      return this.f() ? ((zyi)this.c.d).a(this.d) : false;
   }

   Cell B() {
      byte var1 = 0;
      byte var2 = 0;
      int[] var3 = new int[]{var1};
      int[] var4 = new int[]{var2};
      this.d.r().x().a(this.v(), var3, var4);
      int var5 = var3[0];
      int var6 = var4[0];
      return this.d.getRows().a(var5, false, true, false).a(var6, false, true);
   }

   void C() {
      if (this.f()) {
         zyi var1 = (zyi)this.c.d;
         byte[] var2 = var1.b;
         if (this.d.r().x().a((byte)1, var2)) {
            byte var3 = 0;
            byte var4 = 0;
            int[] var5 = new int[]{var3};
            int[] var6 = new int[]{var4};
            this.d.r().x().a(var2, var5, var6);
            int var8 = var5[0];
            int var9 = var6[0];
            Cell var7;
            if (var8 == this.getRow()) {
               if (var9 == this.c.a) {
                  var7 = this;
               } else {
                  var7 = this.b.a(var9, true, true);
               }
            } else {
               var7 = this.d.checkCell(var8, var9);
            }

            if (var7 != null && var7.f()) {
               var1 = (zyi)var7.c.d;
               if (var1.a() != null && !var1.a().b()) {
                  var7.K();
               }
            }
         }
      }

   }

   public void setArrayFormula(String arrayFormula, int rowNumber, int columnNumber) {
      if (rowNumber > 0 && columnNumber > 0) {
         if ((rowNumber > 1 || columnNumber > 1) && this.d.h().getListObjects().c(this.getRow(), this.getColumn()) != null) {
            CellArea var4 = new CellArea();
            var4.StartRow = this.getRow();
            var4.StartColumn = this.getColumn();
            var4.EndRow = this.getRow() + rowNumber - 1;
            var4.EndColumn = this.getColumn() + columnNumber - 1;
            ListObjectCollection var5 = this.d.h().getListObjects();

            for(int var6 = 0; var6 < var5.getCount(); ++var6) {
               int var7 = var5.get(var6).E().b(var4);
               if (var7 != 0) {
                  throw new CellsException(7, "Mutli-Cell array formulas are not allowed in the tables.");
               }
            }
         }

         this.a(arrayFormula, rowNumber, columnNumber);
      } else {
         throw new IllegalArgumentException();
      }
   }

   void a(String var1, int var2, int var3) {
      if (var2 > 0 && var3 > 0) {
         zakq.a(this.getRow() + var2 - 1, this.c.a + var3 - 1);
         this.b();
         this.e();
         String var4 = var1.trim();
         this.d.r().x().a(this, var4, var2, var3);
         byte[] var5 = ((zyi)((zyi)this.c.d)).b;
         ((zyi)((zyi)this.c.d)).b(true);
         int var6 = this.getRow();
         int var7 = var6 + var2;
         int var8 = this.c.a + var3;

         for(int var10 = var6; var10 < var7; ++var10) {
            Row var9;
            if (var10 == var6) {
               var9 = this.b;
            } else {
               var9 = this.d.getRows().a(var10, false, true, false);
            }

            for(int var11 = this.c.a; var11 < var8; ++var11) {
               if (var10 != this.getRow() || var11 != this.c.a) {
                  Cell var12 = var9.a(var11, false, true);
                  var12.e();
                  byte[] var13 = new byte[var5.length];
                  System.arraycopy(var5, 0, var13, 0, var5.length);
                  zyi var14 = new zyi(var10, var11, var13);
                  var14.b(true);
                  var12.a(var14);
               }
            }
         }

         if (var7 > var6) {
            this.b();
         }

      } else {
         throw new IllegalArgumentException();
      }
   }

   zyk a(CellArea var1, boolean var2, boolean var3, String var4, String var5, boolean var6, boolean var7) {
      byte[] var8 = this.d.r().x().a().a((byte)2, this.b.a.h(), this.c.a);
      zaaz var9 = new zaaz();
      zyk var10 = new zyk(this.b.a.h(), this.c.a, var9, var8);
      var9.a = var1;
      var9.b(var6);
      var9.c(var7);
      if (var2) {
         var9.d(true);
         var9.a(var4);
         var9.b(var5);
      } else if (var9.f()) {
         var9.d(false);
         var9.e(false);
         var9.b(var4);
      } else {
         var9.d(false);
         var9.e(true);
         var9.b(var4);
      }

      return var10;
   }

   public void removeArrayFormula(boolean leaveNormalFormula) {
      this.b();
      zyi var2 = (zyi)this.c.d;
      if (var2.e()) {
         zaz var3 = var2.a();
         if (var3 == null) {
            byte[] var4 = var2.b;
            byte var5 = 0;
            byte var6 = 0;
            int[] var7 = new int[]{var5};
            int[] var8 = new int[]{var6};
            this.d.r().x().a(var4, var7, var8);
            int var11 = var7[0];
            int var12 = var8[0];
            Cell var9 = this.d.getRows().a(var11, false, true, false).a(var12, false, true);
            var2 = (zyi)var9.c.d;
            var3 = var2.a();
         }

         if (var3 != null) {
            CellArea var10 = var3.a();
            this.d.a(var10, var10.StartRow, var10.StartColumn, new zgs(this.d, leaveNormalFormula ? var3.d() : null), false, false);
            this.b();
         }
      }
   }

   public void setAddInFormula(String addInFileName, String addInFunction) {
      this.b();
      this.e();
      if (addInFileName != null && !"".equals(addInFileName)) {
         addInFileName = zbqg.a(addInFileName, 8);
      }

      addInFunction = addInFunction.trim().toUpperCase();
      String var3 = null;
      zyd var4 = this.d.r().x();
      String[] var5 = new String[]{var3};
      byte[] var6 = var4.a(addInFunction, var5, this);
      var3 = var5[0];
      int var7 = -1;
      boolean var8 = true;
      int var9 = -1;
      zbqf var10 = this.d.r().v();
      boolean var11 = false;
      boolean var12 = false;
      zbqg var13 = null;

      int var14;
      for(var14 = 0; var14 < var10.getCount(); ++var14) {
         var13 = var10.a(var14);
         if (addInFileName != null && !"".equals(addInFileName)) {
            if (com.aspose.cells.b.a.zv.b(var13.i(), addInFileName)) {
               var7 = var14;
               var11 = true;
            }
         } else if (var13.f()) {
            var7 = var14;
            var11 = true;
         }

         if (var11) {
            break;
         }
      }

      int var16;
      zuk var17;
      if (!var11) {
         var13 = new zbqg();
         if (addInFileName != null && !"".equals(addInFileName)) {
            var13.a(0);
            var13.d(addInFileName);
            var13.a(new String[]{"Sheet1"});
         } else {
            var13.a(2);
         }

         var17 = new zuk(var13);
         var17.a(var3, this.d.r().n().k());
         com.aspose.cells.b.a.a.ze.a(var13.b(), (Object)var17);
         var9 = 1;
         this.d.r().v().a(var13);
         var16 = this.d.r().q().b(this.d.r().v().getCount() - 1, 65534, 65534);
      } else {
         var16 = this.d.r().q().f(var7, 65534, 65534);
         var11 = true;

         for(var14 = 0; var14 < var13.b().size(); ++var14) {
            zuk var15 = (zuk)var13.b().get(var14);
            if (com.aspose.cells.b.a.zv.b(var15.e().toUpperCase(), var3.toUpperCase())) {
               var9 = var14 + 1;
               var12 = true;
               break;
            }
         }

         if (!var12) {
            var17 = new zuk(var13);
            var17.a(var3, this.d.r().n().k());
            com.aspose.cells.b.a.a.ze.a(var13.b(), (Object)var17);
            var9 = var13.b().size();
         }
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var16), 0, var6, 1, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var9), 0, var6, 3, 2);
      byte[] var18;
      zyi var19;
      if (this.d.r().n().k()) {
         var18 = new byte[8 + var6.length];
         System.arraycopy(com.aspose.cells.b.a.zc.a(var6.length), 0, var18, 0, 4);
         System.arraycopy(var6, 0, var18, 4, var6.length);
         var19 = new zyi(this.getRow(), this.c.a, var18);
      } else {
         var18 = new byte[2 + var6.length];
         System.arraycopy(com.aspose.cells.b.a.zc.a((short)var6.length), 0, var18, 0, 2);
         System.arraycopy(var6, 0, var18, 2, var6.length);
         var19 = new zyi(this.getRow(), this.c.a, var18);
      }

      this.a(var19);
   }

   void b(Cell var1, int var2) {
      if (var1 == null) {
         switch(var2) {
         case 0:
         case 1:
         case 8:
         case 11:
            this.e();
            this.b(-1);
            break;
         case 2:
         case 3:
            this.e();
            this.b(-1);
         case 4:
         case 5:
         case 6:
         case 10:
         default:
            break;
         case 7:
            this.b(-1);
            break;
         case 9:
         case 12:
            this.e();
            this.b(-1);
         }

      } else {
         boolean var3 = false;
         StyleFlag var4;
         Style var5;
         switch(var2) {
         case 0:
         case 1:
            this.copy(var1);
            break;
         case 2:
         case 3:
            this.c(var1);
            Style var6 = this.getStyle();
            StyleFlag var8 = new StyleFlag();
            var8.setNumberFormat(true);
            var8.setFont(true);
            var8.setCellShading(true);
            var8.setLocked(true);
            var8.setHideFormula(true);
            var8.setHorizontalAlignment(true);
            var8.setVerticalAlignment(true);
            var8.setIndent(true);
            var8.setRotation(true);
            var8.setShrinkToFit(true);
            var8.setTextDirection(true);
            var8.setWrapText(true);
            zakq.a(var1.getStyle(), var6, var8);
            this.a(var6);
         case 4:
         case 5:
         case 6:
         case 10:
         default:
            break;
         case 7:
            if (var1.d.r() != this.d.r()) {
               this.a(var1.p());
            } else {
               this.b(var1.r());
            }
            break;
         case 8:
            this.c(var1);
            var3 = var1.f();
            break;
         case 9:
            this.c(var1);
            var4 = new StyleFlag();
            var4.setNumberFormat(true);
            var5 = this.getStyle();
            zakq.a(var1.getStyle(), var5, var4);
            this.a(var5);
            var3 = var1.f();
            break;
         case 11:
            this.putValue(var1.getValue());
            break;
         case 12:
            var4 = new StyleFlag();
            var4.setNumberFormat(true);
            var5 = this.getStyle();
            zakq.a(var1.getStyle(), var5, var4);
            this.a(var5);
         }

         if (var3 && this.f() && (var1.getRow() != this.getRow() || var1.c.a != this.c.a)) {
            zyi var7 = (zyi)this.c.d;
            zyo.a(this.d.r(), this.getRow(), this.getRow() - var1.getRow(), var1.getRow(), this.c.a, this.c.a - var1.c.a, var1.c.a, var7.b, -1, -1);
            if (var7.a() != null) {
               var7.a().a(this.d.h(), this.d == var1.d, var1.D().a(), this.getRow(), this.c.a);
            }
         }

      }
   }

   public void copy(Cell cell) {
      this.b();
      if (!this.equals(cell)) {
         this.d.r().n().d();
         this.e();
         if (cell.z()) {
            cell.C();
         }

         this.d(cell);
         if (this.f() && (cell.getRow() != this.getRow() || cell.c.a != this.c.a)) {
            zyi var2 = (zyi)this.c.d;
            zyo.a(this.d.r(), this.getRow(), this.getRow() - cell.getRow(), cell.getRow(), this.c.a, this.c.a - cell.c.a, cell.c.a, var2.b, -1, -1);
            if (var2.a() != null) {
               var2.a().a(this.d.h(), this.d == cell.d, cell.D().a(), this.getRow(), this.c.a);
            }
         }

      }
   }

   zaz D() {
      return this.f() ? ((zyi)this.c.d).a() : null;
   }

   void a(zaz var1) {
      if (this.f()) {
         zyi var2 = (zyi)this.c.d;
         zyj var3 = new zyj(var2.e, var2.f, var1);
         var3.a(var2);
         this.d.b.a(var2.a, var3);
         this.c.d = var3;
      }

   }

   zaaz E() {
      return this.f() ? ((zyi)this.c.d).b() : null;
   }

   void c(Cell var1) {
      if (var1.c.c == 4) {
         this.a((Cell)var1, (CopyOptions)null);
      } else if (var1.f()) {
         this.c(var1, (CopyOptions)null);
      } else {
         this.a(var1.c.c, var1.c.d, true);
      }

   }

   void d(Cell var1) {
      if (var1.c.c == 4) {
         this.a((Cell)var1, (CopyOptions)null);
      } else if (var1.f()) {
         if (!this.c(var1, (CopyOptions)null)) {
            zyi var2 = (zyi)var1.c.d;
            if (var2.c == 4) {
               this.putValue((String)var2.d);
            } else {
               this.a(var2.c, var2.d, true);
            }
         }
      } else {
         this.a(var1.c.c, var1.c.d, true);
      }

      if (var1.d.r() != this.d.r()) {
         this.a(var1.p());
      } else {
         this.b(var1.r());
      }

   }

   void a(Cell var1, CopyOptions var2) {
      zayy var3 = (zayy)var1.c.d;
      if (var3.f()) {
         zbap var4 = (zbap)var3;
         if (this.d.r() == var1.d.r() && var4.j()) {
            ++var4.d;
            this.a(4, var4, true);
            return;
         }

         zbap var5 = new zbap(var4.c, (byte[])null);
         var5.a(var1, var4, this);
         this.d.e().a(var5);
         this.a(4, var5, true);
      } else if (this.d.r() == var1.d.r()) {
         ++var3.d;
         this.a(4, var3, true);
      } else {
         this.a(4, var3.c);
      }

   }

   void b(Cell var1, CopyOptions var2) {
      if (var1.c.c == 4) {
         this.a(var1, var2);
      } else if (var1.f()) {
         if (!var2.a && var1.d.r() != this.d.r()) {
            if (var2.getCopyInvalidFormulasAsValues()) {
               if (((zyi)var1.c.d).a(var1.d, var1.d.r(), var2.f, var2.g)) {
                  this.putValue(var1.getValue());
               } else if (!this.c(var1, var2)) {
                  this.putValue(var1.c.d);
               }
            } else if (!this.c(var1, var2)) {
               this.putValue(var1.c.d);
            }
         } else {
            zyi var3 = ((zyi)var1.c.d).a(this.getRow(), this.c.a, var1.d.r(), this.d.r(), var2);
            this.a(var3);
         }
      } else {
         this.a(var1.c.c, var1.c.d, true);
      }

      if (!var2.a && var1.d.r() != this.d.r()) {
         int var6 = var1.s();
         if (var2.b.get(var6) != null) {
            this.b((Integer)var2.b.get(var6));
         } else {
            Style var4 = var1.p();
            if (var4 == null) {
               this.b(-1);
            } else if (var4.h() != -1 && var4.h() != 0) {
               if (var2.b.get(var4.h()) == null) {
                  Style var5 = var1.d.r().f(var4.h());
                  var2.b.put(var4.h(), this.d.r().B().g(var5));
               }

               int var7 = (Integer)var2.b.get(var4.h());
               this.b(this.d.r().B().a(var4, var7));
            } else {
               this.b(this.d.r().a(var4));
            }

            var2.b.put(var6, this.s());
         }
      } else {
         this.b(var1.s());
      }

   }

   boolean c(Cell var1, CopyOptions var2) {
      zyi var3 = (zyi)var1.c.d;
      zyi var4 = null;
      if (var3.a() != null && var3.a().b()) {
         var4 = var3.a(this.getRow(), this.getColumn(), var1.d.r(), this.d.r(), var2);
      } else {
         try {
            var4 = new zyi(this.getRow(), this.c.a);
            var4.a(var3);
            if (this.d == var1.d) {
               byte[] var5 = new byte[var3.b.length];
               System.arraycopy(var3.b, 0, var5, 0, var5.length);
               var4.b = var5;
            } else {
               var1.d.r().b().a(2);
               var4.b = this.d.r().x().a(this.d.h().getIndex(), this.getRow(), this.getColumn(), var1.getFormula().trim(), (byte)0);
               var1.d.r().b().a(0);
            }
         } catch (Exception var6) {
            if (var1.d.r() != this.d.r()) {
               return false;
            }

            var4 = var3.a(this.getRow(), this.c.a, var1.d.r(), this.d.r(), var2);
         }
      }

      this.a(var4);
      return true;
   }

   Object F() {
      switch(this.c.c) {
      case 3:
         return zsk.a((Byte)this.c.d);
      case 4:
         return ((zayy)this.c.d).c;
      case 5:
         zyi var1 = (zyi)this.c.d;
         switch(var1.c) {
         case 3:
            return zsk.a((Byte)var1.d);
         case 6:
            return zavz.a((Integer)var1.d);
         default:
            return var1.d;
         }
      case 6:
         return zavz.a((Integer)this.c.d);
      default:
         return this.c.d;
      }
   }

   byte G() {
      return this.g().c();
   }

   void a(byte var1) {
      if (this.f()) {
         this.g().a(var1);
      }

   }

   boolean H() {
      return this.g().d();
   }

   void b(boolean var1) {
      this.g().a(var1);
   }

   void a(zyi var1) {
      this.d.b.a(var1);
      this.a(5, var1, true);
   }

   void a(int var1, Object var2) {
      if (this.c.c == 5) {
         zyi var3 = (zyi)this.c.d;
         var3.c = var1;
         var3.d = var2;
      } else {
         if (var1 == 4) {
            this.a(4, this.d.r().g.a((String)var2), false);
         } else {
            this.a(var1, var2, false);
         }

      }
   }

   void a(Object var1, byte var2) {
      this.a(var2);
      zyi var3 = (zyi)this.c.d;
      Object var4 = var3.d;
      if (var1 == null) {
         var3.c = 6;
         var3.d = 2;
      } else if (var1 instanceof zst) {
         var3.c = 3;
         var3.d = com.aspose.cells.a.c.zi.a(zsk.b((zst)var1));
      } else if (var1 instanceof String) {
         var3.c = 4;
         var3.d = var1;
      } else if (com.aspose.cells.a.c.zc.a(var1)) {
         if (this.y()) {
            zyd.a(var1, this);
         } else {
            Object[][] var5 = (Object[][])((Object[][])var1);
            this.a(var5[0][0], var2);
         }

      } else {
         var3.a(this, var1);
         if (this.d.r().n().getSettings().getPrecisionAsDisplayed()) {
            this.a(this.c);
         }

      }
   }

   public Object getValue() {
      this.c();
      return this.l();
   }

   public void setValue(Object value) {
      this.putValue(value);
   }

   public boolean isStyleSet() {
      if (this.e) {
         this.b();
      }

      return this.q();
   }

   void a(String var1, ArrayList var2) {
      if (var2.size() != 0 && var2.size() != 1) {
         zbap var5 = new zbap(var1, (byte[])null);
         var5.a(var2);
         this.d.e().a(var5);
         this.a(4, var5, true);
      } else {
         this.putValue(var1);
         if (var2.size() == 1) {
            FontSetting var3 = (FontSetting)var2.get(0);
            Style var4 = this.getStyle();
            var4.getFont().c(var3.getFont());
            this.a(var4);
         }
      }

   }

   public FontSetting characters(int startIndex, int length) {
      this.b();
      if (this.c.c != 4) {
         throw new CellsException(7, "This method only works on cell with string value.");
      } else {
         zbap var3 = null;
         zayy var4 = (zayy)this.c.d;
         if (var4.f()) {
            var3 = (zbap)this.c.d;
            if (var3.j()) {
               if (var3.d > 1) {
                  zbap var5 = new zbap(var3.c, (byte[])null, 1);
                  var5.a(var3, this);
                  --var3.d;
                  var3 = var5;
                  this.d.e().a(var5);
                  this.a(4, var5, false);
               } else {
                  var3.a(this);
               }
            }
         } else {
            this.d.e().b(var4);
            var3 = new zbap(((zayy)this.c.d).c, (byte[])null, 1);
            var3.a(new ArrayList());
            this.d.e().a(var3);
            this.a(4, var3, false);
         }

         ArrayList var8 = var3.i();

         FontSetting var6;
         for(int var7 = 0; var7 < var8.size(); ++var7) {
            var6 = (FontSetting)var8.get(var7);
            if (var6.getLength() == length && var6.getStartIndex() == startIndex) {
               return var6;
            }
         }

         var6 = new FontSetting(startIndex, length, this.d.r(), false);
         var6.getFont().c(this.p().getFont());
         var6.getFont().l();
         com.aspose.cells.b.a.a.ze.a(var8, (Object)var6);
         return var6;
      }
   }

   public boolean isRichText() {
      if (this.e) {
         this.b();
      }

      return this.I();
   }

   boolean I() {
      return this.c.c == 4 && ((zayy)this.c.d).f();
   }

   public FontSetting[] getCharacters() {
      if (!this.I()) {
         return null;
      } else {
         zbap var1 = (zbap)this.c.d;
         ArrayList var2 = var1.a(this.d.r(), this.j().length(), this.p().getFont());
         FontSetting[] var3 = new FontSetting[var2.size()];

         for(int var4 = 0; var4 < var3.length; ++var4) {
            var3[var4] = (FontSetting)var2.get(var4);
         }

         return var3;
      }
   }

   ArrayList J() {
      ArrayList var1 = new ArrayList();
      Style var2 = this.getStyle();
      if (!this.I()) {
         zot var3 = new zot();
         var3.a = this.j();
         var3.b = var2.q();
         com.aspose.cells.b.a.a.ze.a(var1, (Object)var3);
      } else {
         zbap var8 = (zbap)this.c.d;
         ArrayList var4 = var8.a(this.d.r(), this.j().length(), this.p().getFont());

         for(int var5 = 0; var5 < var4.size(); ++var5) {
            FontSetting var6 = (FontSetting)var4.get(var5);
            zot var7 = new zot();
            var7.a = var8.c.substring(var6.getStartIndex(), var6.getStartIndex() + var6.getLength());
            var7.b = var6.c() == null ? var2.getFont() : var6.getFont();
            com.aspose.cells.b.a.a.ze.a(var1, (Object)var7);
         }
      }

      return var1;
   }

   ArrayList a(zxu var1, Style var2) {
      ArrayList var3 = new ArrayList();
      Font var6;
      if (!this.I()) {
         zot var4 = new zot();
         zfv var5 = this.c.d();
         if (var5.c == 3) {
            var4.a = this.a(var5.d);
         } else {
            var4.a = b(var5, var1, var2, this.d);
         }

         var6 = var2.q();
         if (var6 != null) {
            var4.b = new Font(this.d.r(), (Object)null, false);
            var4.b.c(var6);
         }

         com.aspose.cells.b.a.a.ze.a(var3, (Object)var4);
      } else {
         zbap var11 = (zbap)this.c.d;
         ArrayList var12 = var11.a(this.d.r(), this.j().length(), this.p().getFont());
         var6 = var2.q();

         for(int var7 = 0; var7 < var12.size(); ++var7) {
            FontSetting var8 = (FontSetting)var12.get(var7);
            zot var9 = new zot();
            var9.a = var11.c.substring(var8.getStartIndex(), var8.getStartIndex() + var8.getLength());
            Font var10 = var8.c();
            if (var10 == null) {
               var10 = var6;
            }

            if (var10 != null) {
               var9.b = new Font(this.d.r(), (Object)null, false);
               var9.b.c(var10);
            }

            com.aspose.cells.b.a.a.ze.a(var3, (Object)var9);
         }
      }

      return var3;
   }

   private String a(Object var1) {
      int var3 = this.getWorksheet().getPageSetup().getPrintErrors();
      String var2;
      switch(var3) {
      case 0:
         var2 = "";
         break;
      case 1:
         var2 = "--";
         break;
      case 2:
         var2 = zfv.a(var1);
         break;
      case 3:
         var2 = "#N/A";
         break;
      default:
         var2 = zfv.a(var1);
      }

      return var2;
   }

   public boolean isMerged() {
      return this.d.q().c(this.getRow(), this.c.a);
   }

   public Range getMergedRange() {
      return this.d.q().a(this.d, this.getRow(), this.c.a);
   }

   public String getHtmlString() throws Exception {
      return zfz.a(this);
   }

   public void setHtmlString(String value) {
      zfz.a(this, value);
   }

   void K() {
      if (this.x()) {
         zyi var1 = (zyi)this.c.d;
         byte[] var2 = var1.a().d();
         byte[] var3 = new byte[var2.length];
         System.arraycopy(var2, 0, var3, 0, var2.length);
         zyo.a(var3, -1, -1, var1.e, var1.f, this.d.r());
         zyi var4 = new zyi(var1.e, var1.f);
         var4.a(var1);
         var4.b = var3;
         this.d.b.a(var1.a, var4);
         this.c.d = var4;
         CellArea var5 = var1.a().a();
         int var6 = var5.StartColumn;
         int var7 = var5.EndColumn;
         RowCollection var8 = this.d.getRows();
         zr var9 = this.d.f();
         zahr var10 = var8.a.a(var5.StartRow, var5.EndRow, false);
         zfv var14 = new zfv();

         while(true) {
            zp var11;
            zahl var12;
            do {
               if (!var10.hasNext()) {
                  return;
               }

               var11 = var10.e();
               var12 = var11.b(var6, var7, false);
            } while(var12 == null);

            while(true) {
               int var13 = var12.a();
               if (var13 < 0) {
                  break;
               }

               zfv var15 = var11.a(var13, var14, 7);
               if (var15.c == 5) {
                  var1 = (zyi)var15.d;
                  if (var1 != var4 && this.d.r().x().a((byte)1, var1.b)) {
                     byte var16 = 0;
                     byte var17 = 0;
                     int[] var18 = new int[]{var16};
                     int[] var19 = new int[]{var17};
                     this.d.r().x().a(var1.b, var18, var19);
                     int var20 = var18[0];
                     int var21 = var19[0];
                     if (var20 == var4.e && var21 == var4.f) {
                        var3 = new byte[var2.length];
                        System.arraycopy(var2, 0, var3, 0, var2.length);
                        zyo.a(var3, -1, -1, var11.h(), var15.a, this.d.r());
                        var1.b = var3;
                     }
                  }
               }
            }
         }
      }
   }

   public void setSharedFormula(String sharedFormula, int rowNumber, int columnNumber) {
      if (rowNumber > 0 && columnNumber > 0) {
         this.b();
         this.e();
         String var4 = sharedFormula.trim();
         WorksheetCollection var5 = this.d.r();
         var5.x().b(this, var4, rowNumber, columnNumber);
         byte[] var6 = this.v();
         int var7 = this.getRow();
         int var8 = var7 + rowNumber;
         int var9 = this.c.a + columnNumber;

         for(int var11 = var7; var11 < var8; ++var11) {
            Row var10;
            if (var11 == var7) {
               var10 = this.b;
            } else {
               var10 = this.d.getRows().a(var11, false, true, false);
            }

            for(int var12 = this.c.a; var12 < var9; ++var12) {
               if (var11 != this.getRow() || var12 != this.c.a) {
                  Cell var13 = var10.a(var12, false, true);
                  var13.e();
                  byte[] var14 = new byte[var6.length];
                  System.arraycopy(var6, 0, var14, 0, var6.length);
                  zyi var15 = new zyi(var11, var12, var14);
                  var13.a(var15);
               }
            }
         }

      } else {
         throw new IllegalArgumentException();
      }
   }

   byte[] a(String var1, CellArea var2) {
      int var3 = var2.EndRow - var2.StartRow + 1;
      int var4 = var2.EndColumn - var2.StartColumn + 1;
      if (var3 > 0 && var4 > 0) {
         this.e();
         this.d.r().x().b(this, var1.trim(), var3, var4);
         zyi var5 = (zyi)this.c.d;
         var5.a().a(var2);
         return var5.b;
      } else {
         throw new IllegalArgumentException();
      }
   }

   void c(byte[] var1) {
      byte[] var2 = new byte[var1.length];
      System.arraycopy(var1, 0, var2, 0, var1.length);
      zyi var3 = new zyi(this.getRow(), this.c.a, var2);
      this.a(var3);
   }

   public String toString() {
      StringBuilder var1 = new StringBuilder();
      var1.append("Aspose.Cells.Cell [ ");
      var1.append(this.i());
      var1.append("; ValueType : ");
      var1.append(zsl.h(this.getType()));
      if (this.getType() != 3) {
         var1.append("; Value : " + this.j());
      }

      if (this.f()) {
         var1.append("; Formula:" + this.getFormula());
      }

      var1.append(" ]");
      return com.aspose.cells.b.a.zr.a(var1);
   }

   public boolean equals(Object obj) {
      if (obj == this) {
         return true;
      } else {
         return !(obj instanceof Cell) ? false : this.equals((Cell)obj);
      }
   }

   public int hashCode() {
      return this.d.hashCode() + (this.getRow() << 16 | this.getColumn());
   }

   public boolean equals(Cell cell) {
      return cell == this || this.d == cell.d && cell.getColumn() == this.getColumn() && (cell.b.a == this.b.a || cell.getRow() == this.getRow());
   }

   public ConditionalFormattingResult getConditionalFormattingResult() {
      if (this.e) {
         this.b();
      }

      zee var1 = zka.a(this.d.h(), this, (zaay)null, this.o(), false);
      if (var1 == null) {
         return null;
      } else {
         return var1.a != null || var1.c != null && var1.c.size() != 0 ? new ConditionalFormattingResult(var1) : null;
      }
   }

   public Validation getValidation() {
      return this.d.h().getValidations().getValidationInCell(this.getRow(), this.getColumn());
   }

   public boolean getValidationValue() {
      Validation var1 = this.getValidation();
      return var1 == null ? true : zbur.a(var1, this.d.h(), this);
   }

   public ListObject getTable() {
      return this.d.h().getListObjects().c(this.getRow(), this.getColumn());
   }

   static int a(Cells var0, zp var1, int var2) {
      int var3 = var1.g(var2);
      if (var3 > -1) {
         return var3;
      } else {
         var3 = Row.e(var1);
         if (var3 == 15) {
            var3 = var0.e(var1.a(var2));
         }

         return var3 < 0 ? 15 : var3;
      }
   }

   static int a(Cells var0, int var1, zfv var2) {
      if (var2.b < 0) {
         if (var1 != 15) {
            return var1;
         } else {
            var1 = var0.e(var2.a);
            return var1 != -1 ? var1 : 15;
         }
      } else {
         return var2.b;
      }
   }

   static Style b(Cells var0, zp var1, int var2) {
      Style var3 = new Style(var0.r());
      var3.a(var0.r(), a(var0, var1, var2));
      return var3;
   }

   static Style c(Cells var0, zp var1, int var2) {
      int var3 = var1.g(var2);
      if (var3 < 0) {
         var3 = Row.e(var1);
         if (var3 == 15) {
            var3 = var0.e(var1.a(var2));
            if (var3 < 0) {
               return var0.r().D();
            }
         }
      }

      return var0.r().g(var3);
   }

   static Style a(Cells var0, zp var1, zfv var2) {
      int var3 = var2.b;
      if (var3 < 0) {
         var3 = Row.e(var1);
         if (var3 == 15) {
            var3 = var0.e(var2.a);
            if (var3 < 0) {
               return var0.r().D();
            }
         }
      }

      return var0.r().g(var3);
   }

   static Style b(Cells var0, int var1, zfv var2) {
      int var3 = var2.b;
      if (var3 < 0) {
         if (var1 != 15) {
            var3 = var1;
         } else {
            var3 = var0.e(var2.a);
            if (var3 < 0) {
               return var0.r().D();
            }
         }
      }

      return var0.r().g(var3);
   }

   static int a(Cells var0, int var1, int var2) {
      if (var1 == 15) {
         var1 = var0.e(var2);
         if (var1 < 0) {
            return 15;
         }
      }

      return var1;
   }

   static Style a(Cells var0, Row var1, zfv var2, int var3, boolean var4) {
      Style var5 = new Style(var0.r());
      var5.copy(a(var0, var1.a, var2));
      if (var4) {
         var5 = var0.a(var5, var1.a.h(), var2.a, 0, 1048575, false, var1.c.a);
         var5 = var0.a(var5, var1.a, var2.a, var3, 0, 16383, false);
      }

      return var5;
   }

   static String b(Cells var0, zp var1, zfv var2) {
      zfv var3 = var2.d();
      switch(var3.c) {
      case 0:
         return "";
      case 1:
      case 2:
      default:
         return a(a(var3, var0.h().getWorkbook().getSettings().e().j(), a(var0, var1, var2), var0));
      case 3:
         return var3.f();
      case 4:
         return (String)var3.d;
      }
   }

   static String a(Cells var0, Style var1, zfv var2) {
      zfv var3 = var2.d();
      switch(var3.c) {
      case 0:
         return "";
      case 1:
      case 2:
      default:
         return a(a(var3, var0.h().getWorkbook().getSettings().e().j(), var1, var0));
      case 3:
         return var3.f();
      case 4:
         return (String)var3.d;
      }
   }

   private static String a(zxz var0) {
      if (var0 != null && !var0.b()) {
         return var0.e() ? "###############################################################################################################################################################################################################################################################" : var0.a(0, true);
      } else {
         return "";
      }
   }

   static String a(Cells var0, zp var1, zfv var2, int var3, boolean var4) {
      zfv var5 = var2.d();
      if (var5.c == 0) {
         return "";
      } else {
         return var5.c == 3 ? var5.f() : a(a(var5, var0.h().getWorkbook().getSettings().e().j(), a(var0, var1, var2), var0), var3, var4);
      }
   }

   static String a(Cells var0, Style var1, zfv var2, int var3, boolean var4) {
      return a(a(var2.d(), var0.h().getWorkbook().getSettings().e().j(), var1, var0), var3, var4);
   }

   private static String a(zxz var0, int var1, boolean var2) {
      if (var0 == null) {
         return "";
      } else {
         if (var0.e()) {
            if (var1 <= 1) {
               return "#";
            }
         } else if (var1 < 0) {
            return var0.h();
         }

         return var0.a(var1, var2);
      }
   }

   static zxz a(zfv var0, zxu var1, Style var2, Cells var3) {
      byte var4 = 18;
      boolean var5 = false;
      switch(var0.c) {
      case 0:
         return null;
      case 1:
         if (!var3.h().getDisplayZeros() && (Double)var0.d == 0.0D) {
            var5 = true;
         }

         var4 = 14;
         break;
      case 2:
         var4 = 3;
         break;
      case 3:
         zxz var6 = new zxz();
         var6.a(1, (String)var0.f());
         return var6;
      case 4:
      case 5:
      default:
         break;
      case 6:
         if (!var3.h().getDisplayZeros() && (Integer)var0.d == 0) {
            var5 = true;
         }

         var4 = 9;
      }

      if (var5) {
         String var11 = var2.getCustom();
         if (var11 != null) {
            int var7 = var11.indexOf(59);
            if (var7 > -1 && var11.indexOf(59, var7 + 1) > 0) {
               zxx var8 = var3.h().getWorkbook().getSettings().e();
               zafy var9 = var8.a(var2);
               if (var9.a() == 6) {
                  zxy[] var10 = ((zyb)var9).c();
                  if (var10.length == 3 && var10[2].a() == 1 && var10[2].b() == 0.0D) {
                     return ((zyb)var9).d()[2].a(var8.j(), 9, 0);
                  }
               }
            }
         }

         return null;
      } else {
         return var3.h().getWorkbook().getSettings().e().a(var2).a(var1, var4, var0.d);
      }
   }

   static String b(zfv var0, zxu var1, Style var2, Cells var3) {
      return a(a(var0, var1, var2, var3), var1.a(), var2);
   }

   static String a(zxz var0, zago var1, Style var2) {
      if (var0 != null && !var0.b()) {
         int var3;
         if (var0.e()) {
            var3 = var1.a((String)null, '#');
            return var3 < 1 ? "" : com.aspose.cells.b.a.zv.a('#', var3);
         } else if (var2.getShrinkToFit()) {
            return var0.a(0, true);
         } else {
            if (var0.j() > 0) {
               for(var3 = var0.j() - 1; var3 > -1; --var3) {
                  if (var0.a(var3)) {
                     return var0.a(Math.max(0, var1.a(var0.a(0, false), var0.c(var3))), true);
                  }
               }
            }

            char[] var13;
            switch(var2.getHorizontalAlignment()) {
            case 3:
               var13 = var0.b(0, true);
               if (var13 != null && var13.length >= 1) {
                  String var14 = com.aspose.cells.b.a.zv.a(new String(var13));
                  if (var14.length() < var13.length) {
                     if (var14.equals("")) {
                        return new String(var13);
                     }

                     var13 = var14.toCharArray();
                  }

                  int var15 = var1.a(new String(var0.b(0, false), 0, var13.length), ' ');
                  if (var15 < 1) {
                     return var14;
                  } else {
                     zakl var6 = new zakl();
                     zgd.a(var14, false, var15 + 1, var6);
                     if (var6.a() != 0 && var6.a() <= var15) {
                        var15 /= var6.a();
                        char[] var7 = new char[var13.length + var15 * var6.a()];
                        int var8 = var7.length;
                        int var9 = var13.length;

                        int var10;
                        for(int var12 = var6.a() - 1; var12 > -1; --var12) {
                           int var11 = var6.b(var12);
                           var10 = var9 - var11;
                           var8 -= var10;
                           System.arraycopy(var13, var11, var7, var8, var10);
                           com.aspose.cells.a.c.zc.a(var7, var8 - var15, var8, ' ');
                           var8 -= var15;
                           var9 = var11;
                        }

                        var10 = var6.b(0);
                        System.arraycopy(var13, 0, var7, 0, var10);
                        com.aspose.cells.a.c.zc.a(var7, var10, var10 + var15, ' ');
                        return new String(var7);
                     } else {
                        return var14;
                     }
                  }
               } else {
                  return "";
               }
            case 4:
               var13 = var0.b(0, true);
               if (var13 != null && var13.length >= 1) {
                  int var4 = var1.a((String)null, var0.a(0, false));
                  if (var4 < 2) {
                     return new String(var13);
                  }

                  char[] var5 = new char[var13.length * var4];
                  --var4;

                  while(var4 > -1) {
                     System.arraycopy(var13, 0, var5, var4 * var13.length, var13.length);
                     --var4;
                  }

                  return new String(var5);
               }

               return "";
            default:
               return var0.a(0, true);
            }
         }
      } else {
         return "";
      }
   }

   static void a(Worksheet var0, int var1, zfv var2, zfw var3, boolean var4, zaay var5) {
      ListObjectCollection var6 = var0.j();
      if (var6 != null && var6.getCount() > 0) {
         int var7 = var6.b(var1, var2.a);
         if (var7 > -1) {
            ListObject var8 = var6.get(var7);
            int var9 = var8.c(var1, var2.a);
            if (var9 > -1) {
               var6.b.a(var7, var9, var3);
            }
         }
      }

      ConditionalFormattingCollection var12 = var0.m;
      if (var12 != null && var12.getCount() > 0) {
         if (var5 != null) {
            if (var3.e == null) {
               var5.g = var1;
               var5.h = var2.a;
            } else {
               var5.g = var3.e.getRow();
               var5.h = var3.e.c.a;
            }
         }

         zee var13 = zka.a(var0, var3.e, var5, var3.a, var3.c);
         if (var13.a != null || var13.c != null) {
            var3.d = var13.c;
            ConditionalFormattingResult var15 = new ConditionalFormattingResult(var13);
            if (var13.a != null || var15.getConditionalFormattingColorScale() != null) {
               if (var3.c && var13.b == var3.a) {
                  var3.a();
                  var13.b = var3.a;
               }

               var3.a = var15.a();
               var3.c = false;
               if (var4 && var15.getConditionalStyle() != null && var15.getConditionalStyle().isModified(16)) {
                  var4 = false;
               }
            }
         }
      }

      if (var4) {
         String var14 = var3.a.getCustom();
         if (var14 == null || var14.equals("")) {
            var14 = var0.getWorkbook().getSettings().e().d(var3.a.getNumber());
         }

         if (var14 != null && var14.indexOf(91) > -1) {
            zfv var16 = var2.d();
            byte var10 = 18;
            switch(var16.c) {
            case 0:
            case 3:
               var4 = false;
               break;
            case 1:
               if (!var0.getDisplayZeros() && (Double)var16.d == 0.0D) {
                  var4 = false;
                  break;
               }

               var10 = 14;
               break;
            case 2:
               var10 = 3;
            case 4:
            case 5:
            default:
               break;
            case 6:
               if (!var0.getDisplayZeros() && (Integer)var16.d == 0) {
                  var4 = false;
               } else {
                  var10 = 9;
               }
            }

            if (var4) {
               zafy var11 = var0.getWorkbook().getSettings().e().a(var14, var3.c);
               if (var11.a() == 6) {
                  var11 = ((zyb)var11).b((zxu)null, var10, var16.d);
               }

               if (var11 != null && !var11.b().c().isEmpty()) {
                  var3.a();
                  var3.a.getFont().setColor(var11.b().c());
               }
            }
         }
      }

   }

   static long a(int var0, int var1, int var2) {
      return (long)var1 << 32 | (long)(var2 << 16) | (long)var0;
   }

   static int a(long var0) {
      return (int)(var0 & 65535L);
   }

   static int b(long var0) {
      return (int)(var0 >> 32);
   }

   static int c(long var0) {
      return (int)(var0 >> 16 & 65535L);
   }
}
